package com.sbx.entity.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sbx.validations.RequiredField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("app_store")
public class AppStore {

    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("应用商店id")
    private String id;

    @ApiModelProperty("应用名称")
    @NotEmpty(message = "应用名称不能为空", groups = RequiredField.class)
    private String name;

    @ApiModelProperty("图标")
    @NotEmpty(message = "图标不能为空", groups = RequiredField.class)
    private String icon;

    @ApiModelProperty("详情")
    @NotEmpty(message = "详情不能为空", groups = RequiredField.class)
    private String note;

    @ApiModelProperty(value = "标签 ")
//    @NotNull(message = "",groups = UserSave.class)
    private Integer tag;

    @ApiModelProperty(value = "上架时间", example = "2023-02-08 21:44:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date created;

    @ApiModelProperty(value = "路径")
    @NotEmpty(message = "路径不能为空", groups = RequiredField.class)
    private String path;


}
